/ Assembly List / LJCNetCommon / HTMLBuilder / GetWrapped

Namespace - LJCNetCommon


Parameters
text - The text value.

Returns

The potentially wrapped and indented new text value.

Syntax

C#
public String GetWrapped(String text)

Gets added text and new wrapped line if combined line > LineLimit.

Example

C#
// Defaults: IndentCharCount = 2, LineLimit = 80, WrapEnabled = false.
var hb = new HTMLBuilder()
{
    WrapEnabled = true
};

// Example Method:
var b = new HTMLBuilder();
b.AddText("Now is the time for all good men to come to the aid of their");
b.AddText(" country.");
b.AddText(" Now is the time for all good men to come to the aid of their");
b.AddText(" country.");
var text = b.ToString();
var result = hb.GetWrapped(text);

// result:
// Now is the time for all good men to come to the aid of
// their country.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.